package com.tiancheng.trade.merchant.convert;

/**
 * @Author: kellen
 * @Description: 商户信息转换
 * @Date: create in 2024/12/2 15:05
 */

import com.tiancheng.trade.commom.web.model.request.MerchantPayRegReqVO;
import com.tiancheng.trade.commom.web.model.response.MerchantPayRegResVO;
import com.tiancheng.trade.merchant.dto.requestdto.MerchantPayPivRegVO;
import com.tiancheng.trade.merchant.dto.requestdto.MerchantPayRegVO;
import com.tiancheng.trade.merchant.model.Merchant;
import com.tiancheng.trade.merchant.model.MerchantPayReg;
import com.tiancheng.trade.merchant.model.MerchantPayRegFile;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface MerchantConvert {
    MerchantConvert INSTANCE = Mappers.getMapper(MerchantConvert.class);

    MerchantPayRegResVO convert(Merchant merchant);

    List<MerchantPayRegResVO.MerchantIdFile> convert(List<MerchantPayRegFile> merchantPayRegFiles);

    MerchantPayRegResVO.MerchantIdFile toMerchantIdFile(MerchantPayRegFile merchantPayRegFile);
    MerchantPayRegVO convert2MerchantPayRegVO(MerchantPayRegReqVO merchantPayRegReqVO);

    List<MerchantPayPivRegVO> convert2MerchantIdPic(List<MerchantPayRegFile> fileList);

    MerchantPayPivRegVO to(MerchantPayRegFile fileList);
    MerchantPayReg convert2MerchantPayReg(MerchantPayRegVO merchantPayRegVO);
}
